package cn.yunhe.Interceptor;

import cn.yunhe.action.WordAction;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class WordsInterceptor extends AbstractInterceptor {
    @Override
    public String intercept(ActionInvocation ai) throws Exception {
        WordAction wa= (WordAction) ai.getAction();
     if(wa.getTitle().indexOf("妈的")!=-1||
        wa.getContext().indexOf("妈的")!=-1)
    return "input";
else

        return ai.invoke();
    }
}
